<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
       function getRandomIntInclusive(min, max) 
        {
            min = Math.ceil(min);
            max = Math.floor(max);
            return Math.floor(Math.random() * (max - min + 1)) + min;
        }

        function change(num)
        {   
            return num.toString();
        }

        var str = '#';
        for (var i = 0;i < 6; i++) {
 
            var x = getRandomIntInclusive(0, 15);
            if (x == 10) x='A';else if (x == 11) x='B';
            else if (x == 12) x='C';else if (x == 13) x='D';
            else if (x == 15) x='E';else if (x == 16) x='F';
            str += x;
        }
        console.log(str);
    </script>
</head>
<body>
    
</body>
</html>